package simplelab;

import jason.asSemantics.*;
import jason.asSyntax.*;
import java.util.Iterator;


public class Error extends DefaultInternalAction {
    
    
    
    @Override
    public Object execute(TransitionSystem ts, final Unifier un, final Term[] arg) throws Exception {
        ///System.out.println(" ez van hapsik�m" +ts.getAg().getBB().toString());
        Iterator<Literal> iterable = ts.getAg().getBB().iterator();
        Literal next = iterable.next();
        World.error();
        while(!next.getFunctor().equals("mypos")){
            next = iterable.next();
        }
        System.out.println(" my pos amikor utkozok " + next.getTerm(0) + " y "+ next.getTerm(1));
        return (true);
    }
}